package com.xh.lesson.controller;


import com.xh.lesson.aop.annotation.LogAnnotation;
import com.xh.lesson.service.TManageDepartService;
import com.xh.lesson.utils.DataResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 柴&许
 * @since 2021-06-23
 */
@RestController
@Api(tags = "组织模块-管理部门")
@RequestMapping("/sys")
public class TManageDepartController {
    @Resource
    private TManageDepartService manageDepartService;
    @GetMapping("/manage")
    @ApiOperation(value = "查询组织详情接口")
    @LogAnnotation(title = "管理部门与调配使用部门",action = "查询")
//    @RequiresPermissions("sys:manage:detail")
    public DataResult<List> detailInfo(){
        DataResult<List> result= DataResult.success();
        result.setData(manageDepartService.selectnameBypid());
//        System.out.println(result.toString());
        return result;
    }
}

